package com.sapp.imagecolorization.retrofit

import com.sapp.imagecolorization.retrofit.ImageInfo
import okhttp3.MultipartBody
import retrofit2.Call
import retrofit2.http.*

@JvmSuppressWildcards
interface RestApi {

    @Headers(
        "Api-Key: $apiKey"
    )
    @POST("colorizer")
    @FormUrlEncoded
    fun postImageUrl(@FieldMap imageData: Map<String, String>): Call<ImageInfo>

    @Headers(
        "Api-Key: $apiKey"
    )
    @POST("colorizer")
    @Multipart
    fun postStorageImage(
        @Part imageData: MultipartBody.Part
    ): Call<ImageInfo>
}